<?php

namespace pam\Factory;

/**
 * Description of HealthIndicatorsControllerFactory
 *
 * @author Robert Bwana <robert.bwana@ssra.go.tz>
 */
use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
use pam\Controller\HealthIndicatorsController;

class HealthIndicatorsControllerFactory implements FactoryInterface {

    public function createService(ServiceLocatorInterface $serviceLocator) {
        $policyLocator = $serviceLocator->getServiceLocator();
        $indicatorService = $policyLocator->get('pam\Service\HealthIndicatorsService');
        $policyService = $policyLocator->get('pam\Service\HealthPolicyService');
        $form = $policyLocator->get('FormElementManager')->get('pam\Form\IndicatorForm');

        return new HealthIndicatorsController($indicatorService, $policyService, $form);
    }

}
